﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Media3D;
using NUnit.Framework;
using GeometryViz3D.Model;

namespace UnitTests.Model
{
    [TestFixture]
    public class G3DPointTester
    {

        [Test]
        public void TestProperties()
        {
            G3DPoint p1 = new G3DPoint();

            p1.Label = "A";
            Assert.AreEqual("A", p1.Label);

            p1.Position = new Point3D(1.0, 2.0, 3.0);
            Assert.AreEqual(new Point3D(1.0, 2.0, 3.0), p1.Position);
        }

        [Test]
        public void TestEquality()
        {
            G3DPoint p1 = new G3DPoint();

            p1.Label = "p1";
            Assert.AreEqual("p1", p1.Label);

            G3DPoint p2 = new G3DPoint();
            p2.Label = "p1";

            Assert.IsTrue(p1.Equals(p2));

            p2.Label = "p2";
            Assert.IsFalse(p1.Equals(p2));

            Assert.IsFalse(p1.Equals(null));

            Assert.IsFalse(p1.Equals(new Point3D()));
        }
    }
}
